<div class="container">
  <div class="row center-row">
    <div class="col col-sm col-md col-lg announcement-green">
      <% if @announcements.count!=0 %>
        <h1 class="submain-heading"><%= t("announcements.recent_announcement_heading") %></h1> <br>
        <%= link_to t("announcements.new_announcement"), new_announcement_path, class: "btn primary-button custom-mail-primary-button" %>
        <% @announcements.each do |announcement| %>
          <div class="mb-4 announcement-border p-3 announcement-box">
            <span class="d-flex justify-content-center overflow-hidden announcement-text"><%== announcement.body %></span>
            <%= link_to t("edit"), edit_announcement_url(announcement), class: "anchor-text announcement-anchor btn primary-button" %>
            <%= link_to t("delete"), announcement_url(announcement), method: :delete, data: { confirm: "Are you sure?" }, class: "anchor-text announcement-anchor btn primary-button bg-danger" %>
          </div>
        <% end %>
      <% else %>
        <h1 class="submain-heading"><%= t("announcements.no_announcement_heading") %></h1>
        <%= link_to t("announcements.new_announcement"), new_announcement_path, class: "btn primary-button custom-mail-primary-button m-3" %>
      <% end %>
    </div>
  </div>
</div>
